473,425 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Multiple tables - CSS

I have in my html pages 10 tables and I define some characteristics of those tables in a css file. How can I EXCLUDE one of the table from that css (I just want a simple table, but the remaining 9 tables must take the attributes from the css )

The code for the tables look something like this:

Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2. <!--
  3. table{
  4.     border-spacing: 0px;
  5.     border-collapse: collapse;
  6.     width: 250px;
  7. }
  8. th {
  9.     text-align: center;
  10.     font-weight: bold;
  11.     padding: 2px;
  12.     border: 2px solid #FFFFFF;
  13.     background: #4a70aa;
  14.     color: #FFFFFF;
  15. }
  16. td {
  17.     text-align: center;
  18.     padding: 2px;
  19.     border: 2px solid #FFFFFF;
  20.     background: #e3f0f7;
  21. }
  22. td {
  23.     background: #f7f7f7;
  24. }
  25. -->
  26. </style>
  27.  
Aug 22 '09 #1
3 7487
drhowarddrfine
7,435 Expert 4TB
There are a couple ways to do this. The easiest is to just assign a 'class' name to the 9 tables. Another would be to use a selector but the non-styled table would have to be the first or last in the group.
Aug 22 '09 #2
Could would show me how can I use the selector please?
I want to exclude the first table.

HTML Page:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3.  
  4. <p>
  5. Each table starts with a table tag. 
  6. Each table row starts with a tr tag.
  7. Each table data starts with a td tag.
  8. </p>
  9.  
  10. <h4>One column:</h4>
  11. <table border="1">
  12. <tr>
  13.   <td>100</td>
  14. </tr>
  15. </table>
  16.  
  17. <h4>One row and three columns:</h4>
  18. <table border="1">
  19. <tr>
  20.   <td>100</td>
  21.   <td>200</td>
  22.   <td>300</td>
  23. </tr>
  24. </table>
  25.  
  26. <h4>Two rows and three columns:</h4>
  27. <table border="1">
  28. <tr>
  29.   <td>100</td>
  30.   <td>200</td>
  31.   <td>300</td>
  32. </tr>
  33. <tr>
  34.   <td>400</td>
  35.   <td>500</td>
  36.   <td>600</td>
  37. </tr>
  38. </table>
  39.  
  40. </body>
  41. </html>
  42.  
CSS file
Expand|Select|Wrap|Line Numbers
  1. # table{
  2. #     border-spacing: 0px;
  3. #     border-collapse: collapse;
  4. #     width: 250px;
  5. # }
  6. # th {
  7. #     text-align: center;
  8. #     font-weight: bold;
  9. #     padding: 2px;
  10. #     border: 2px solid #FFFFFF;
  11. #     background: #4a70aa;
  12. #     color: #FFFFFF;
  13. # }
  14. # td {
  15. #     text-align: center;
  16. #     padding: 2px;
  17. #     border: 2px solid #FFFFFF;
  18. #     background: #e3f0f7;
  19. # }
  20. # td {
  21. #     background: #f7f7f7;
  22. # }
  23.  
Aug 22 '09 #3
__________________________________________________ ______________
Up up
Aug 24 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: bdj | last post by:
Hello! Can anyone tell me where to read more about best practices about this: Should I put data in a seperate scheme for tables, packages in anoter schema and create a lot of users that have...
1
by: E Arredondo | last post by:
Hi, I am about migrate from an old program database to MySql (Running under RH LINUX)and I'm wondering which is the best option to do : I currently have one file for each of my modules, (I'm...
6
by: Don Leverton | last post by:
Hi All, I've got a situation where I am developing an Access 97 app for a client, and am in the "beta testing" stage. I have split the app up, using the DB splitter, into front-end /back-end...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
1
by: Ahmet Karaca | last post by:
Hi. myds.Reset(); mycommand.SelectCommand.CommandText= "Select att1 from Ing as Ingredient, Pro as Product "+ "where Pro.ad='apple' and Pro.id=Ing.id"; mycommand.Fill(myds, "Product"); // Here...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
8
by: Jason L James | last post by:
Hi all, does anyone know if I can create a dataview from multiple datatables. My dataset is constructed from four separate tables and then the relationships are added that link the tables...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.